var chartDom = document.getElementById('t4');
var myChart = echarts.init(chartDom);

var option = {
    tooltip: {
        trigger: 'axis',
        axisPointer: {            // 坐标轴指示器，坐标轴触发有效
            type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
        }
    },
    legend: {
        data: ['应收', '应付']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: [
        {
            type: 'value'
        }
    ],
    yAxis: [
        {
            type: 'category',
            axisTick: {
                show: false
            },
        }
    ],
    series: [
        {
            name: '应收',
            type: 'bar',
            label: {
                show: true,
                position: 'top',
				color:'#fff'
            },
            emphasis: {
                focus: 'series'
            },
            data: [200, 170, 240, 244, 200, 220, 210]
        },
        {
            name: '应付',
            type: 'bar',
            stack: '总量',
            label: {
                show: true,
                position: 'top',
				color:'#fff'
            },
            emphasis: {
                focus: 'series'
            },
            data: [-120, -132, -101, -134, -190, -230, -210]
        }
    ]
};

option && myChart.setOption(option);